/*
 * Cargo.h
 *
 *  Created on: Oct 8, 2011
 *      Author: lore
 */

#ifndef CARGO_H_
#define CARGO_H_
#include <string>
#include <sstream>
#include <vector>

using namespace std;

class Cargo {
public:
	Cargo();

	void setCargo(string cargo);
	string getCargo();

	void setCargoId(unsigned long cargoId);
	unsigned long getCargoId();

	void removeAllCargos();
	vector<unsigned long> getCargosSecundarios();
	void addCargos(unsigned long idcargos);
	void SetCargosSecundariosId(vector<unsigned long> idCargos);

	//serializacion
	char* pack();
	unsigned long packLen();
	bool unpack(char* buffer, unsigned long bufferLen);

	virtual ~Cargo();
	
private:
	string cargo;
	unsigned long id;
	vector<unsigned long> idCargos;
};

#endif /* CARGO_H_ */
